{% extends "base.html" %}
{% block title %}Register{% endblock %}
{% block body %}
    <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-4">
            <h1 class="text-center">Register</h1>
            <form method="POST" action="{{ url_for('.register') }}">
                {{ form.hidden_tag() }}
                <div class="form-group">
                    {{ form.username.label }}
                    {% if form.username.errors %}
                        {% for e in form.username.errors %}
                            <p class="help-block">{{ e }}</p>
                        {% endfor %}
                    {% endif %}
                    {{ form.username(class_='form-control') }}
                </div>
                <div class="form-group">
                    {{ form.password.label }}
                    {% if form.password.errors %}
                        {% for e in form.password.errors %}
                            <p class="help-block">{{ e }}</p>
                        {% endfor %}
                    {% endif %}
                    {{ form.password(class_='form-control') }}
                </div>
                <div class="form-group">
                    {{ form.confirm.label }}
                    {% if form.confirm.errors %}
                        {% for e in form.confirm.errors %}
                            <p class="help-block">{{ e }}</p>
                        {% endfor %}
                    {% endif %}
                    {{ form.confirm(class_='form-control') }}
                </div>
                <div class="form-group">
                    {{ form.recaptcha.label }}
                    {% if form.recaptcha.errors %}
                        {% for e in form.recaptcha.errors %}
                            <p class="help-block">{{ e }}</p>
                        {% endfor %}
                    {% endif %}
                    {{ form.recaptcha() }}
                </div>
                <input class="btn btn-primary" type="submit" value="Register">
            </form>
            <hr>
            <h2 class="text-center">Register With OpenID</h2>
            <form method="POST" action="{{ url_for('.register') }}">
                {{ openid_form.hidden_tag() }}
                <div class="form-group">
                    {{ openid_form.openid.label }}
                    {% if openid_form.openid.errors %}
                        {% for e in openid_form.openid.errors %}
                            <p class="help-block">{{ e }}</p>
                        {% endfor %}
                    {% endif %}
                    {{ openid_form.openid(class_='form-control') }}
                </div>
                <input class="btn btn-primary" type="submit" value="Register">
            </form>

            <h2 class="text-center">Register With Facebook</h2>
            <a href="{{ url_for('facebook.login') }}">Login via Facebook</a>
            <h2 class="text-center">Register With Twitter</h2>
            <a href="{{ url_for('twitter.login') }}">Login via Twitter</a>
        </div>
        <div class="col-md-4"></div>
    </div>
{% endblock %}